package com.villaday.idf.adapter3;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.villaday.idf.R;
import com.villaday.idf.base.AbsRecyclerViewAdapter;
import com.villaday.idf.model3.DataEntity;
import com.villaday.idf.model3.HomeDetailsEntity;

public class HomeNumAdapter extends AbsRecyclerViewAdapter<HomeDetailsEntity.BodyBean.PeopleNumberBean> {

    public HomeNumAdapter(Context context) {
        super(context, R.layout.recycle_home_num);
    }

    @Override
    public void onBindHolder(AbsRecyclerViewAdapter.RecyclerViewHolder holder, HomeDetailsEntity.BodyBean.PeopleNumberBean d, int position) {
        holder.bindTextView(R.id.tv_hn, d.getName());

        TextView tvHn = (TextView) holder.getView(R.id.tv_hn);
        if (d.isCheck()) {
            tvHn.setTextColor(context.getResources().getColor(R.color.colorF73637));
            tvHn.setBackgroundResource(R.drawable.shape_solid_ffebeb_4);
        } else {
            tvHn.setTextColor(context.getResources().getColor(R.color.colorTextBlack));
            tvHn.setBackgroundResource(R.drawable.shape_solid_2bg_4);
        }
    }
}
